package com.shujia.innerclass_;

public class Outter4 {
    public static String name;
    public int age;

    public static void run() {
        System.out.println("Outter4 run...");
    }

    public static void userInner() {
        Inner inner = new Inner();
        inner.show();
    }

    public void userInner1() {
        System.out.println(Inner.hobby);
        Inner.sport();
    }

    static class Inner {

        static String hobby = "篮球";

        public static void sport() {
            System.out.println("打" + hobby);
        }

        // 只能访问外部类的静态属性
        public void show() {
            System.out.println(name);
            // System.out.println(age);
            run();
        }

    }
}
